Skip to content

Add systematic PRE/POST Tcl hooks for flow steps#3961

Open
Dhirenderchoudhary wants to merge 4 commits intoThe-OpenROAD-Project:masterfrom
Dhirenderchoudhary:fix/pre-post-step-hooks
Open

Add systematic PRE/POST Tcl hooks for flow steps#3961
Dhirenderchoudhary wants to merge 4 commits intoThe-OpenROAD-Project:masterfrom
Dhirenderchoudhary:fix/pre-post-step-hooks

Conversation

@Dhirenderchoudhary
Copy link

@Dhirenderchoudhary Dhirenderchoudhary commented Mar 6, 2026

Date : 6 March 2026
Developer name : @Dhirenderchoudhary

Description

Implement systematic PRE/POST Tcl step hooks across ORFS so users can inject custom Tcl before and after each major flow step without editing core scripts.

This adds:

Generic hook resolver helper in flow/scripts/util.tcl
PRE_TCL and POST_TCL sourcing in flow step scripts (synth/floorplan/place/cts/route/final)
Variable metadata entries in flow/scripts/variables.yaml
Regenerated hook documentation in docs/user/FlowVariables.md

Related Issue

Closes #3177

Type of Change

  • New feature
  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactor / cleanup
  • CI/CD or build change

Testing

  • Existing tests pass
  • New tests added - tests for commit URL extraction, GitBox support, and pipeline integration
  • Manually verified

Checklist

  • Self-reviewed the code
  • Follows existing importer patterns (v2 pipeline)
  • No new warnings or errors introduced

@Dhirenderchoudhary Dhirenderchoudhary force-pushed the fix/pre-post-step-hooks branch from 300713a to d7ad043 Compare March 6, 2026 13:27
@Dhirenderchoudhary Dhirenderchoudhary marked this pull request as ready for review March 6, 2026 13:46
Comment on lines +3 to 5
source_step_tcl PRE GLOBAL_PLACE
erase_non_stage_variables place
load_design 3_2_place_iop.odb 2_floorplan.sdc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pre hook should be after the design is loaded otherwise it is very limited in what it can do. The is the same in all files.

Signed-off-by: Dhirenderchoudhary <dhirenderchoudhary0001@gmail.com>
@Dhirenderchoudhary Dhirenderchoudhary force-pushed the fix/pre-post-step-hooks branch from d7ad043 to c8b1170 Compare March 6, 2026 14:27
@Dhirenderchoudhary Dhirenderchoudhary marked this pull request as draft March 6, 2026 14:27
Signed-off-by: Dhirender Choudhary <dhirenderchoudhary0001@gmail.com>
Signed-off-by: Dhirenderchoudhary <dhirenderchoudhary0001@gmail.com>
Signed-off-by: Dhirenderchoudhary <dhirenderchoudhary0001@gmail.com>
@Dhirenderchoudhary
Copy link
Author

@maliberty fixed as per requirements please have a look

@Dhirenderchoudhary Dhirenderchoudhary marked this pull request as ready for review March 11, 2026 11:54
log_cmd write_sdc -no_timestamp $output_file
}

proc source_step_tcl { hook_type step_name } {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is defined twice

Comment on lines +3 to +5
source_step_tcl PRE DETAIL_ROUTE
load_design 5_1_grt.odb 5_1_grt.sdc
source_step_tcl PRE DETAIL_ROUTE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the first call

Comment on lines +3 to +7
source_step_tcl PRE CTS
source $::env(SCRIPTS_DIR)/lec_check.tcl
erase_non_stage_variables cts
load_design 3_place.odb 3_place.sdc
source_step_tcl PRE CTS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the first call

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

need PRE_STEP_TCL variables to be implemented

2 participants